/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uit.ieproject.business;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Map;
import uit.ieproject.dataaccess.ActivityDAO;
import uit.ieproject.entities.Activity;

/**
 *
 * @author Maivia
 */
public class ActivityBLO {

    private ActivityDAO activityDAO = new ActivityDAO();

    public void addActivity(Activity activity) throws SQLException {
        activityDAO.addActivity(activity);
    }

    public void deleteActivity(Long personId) throws SQLException {
        activityDAO.deleteActivity(personId);
    }

    public ArrayList<Activity> getAllActivitiesOfPerson(Long id) throws SQLException {
        return activityDAO.getAllActivitiesOfPerson(id);
    }
    
    public String getAnswerAboutActivity(String sql, String timeAsk) throws  SQLException{
        return activityDAO.getAnswerAboutActivity(sql, timeAsk);
    }
}
